package com.bsoft.exchange.controller.queuecall;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.bsoft.exchange.domain.WholeQueues;
import com.bsoft.exchange.pojo.ListWholeQueuesPojo;
import com.bsoft.exchange.response.ResponseEntity;
import com.bsoft.exchange.service.WholeQueuesService;

@RestController
@RequestMapping(value = "queues")
public class WholeQueuesController {
	@Autowired
	private WholeQueuesService wholeQueuesService;

	@RequestMapping(value = "/listWholeQueues",method = RequestMethod.POST,produces = "application/json")
//	public List<WholeQueues> selectList(@RequestParam(value = "hospitalCode") String hospitalCode,
//			@RequestParam(value = "pageNo") int pageNo,
//			@RequestParam(value = "pageSize") int pageSize,
//			@RequestParam(value = "query",required = false) String query) {
//		return wholeQueuesService.selectList(hospitalCode,pageNo,pageSize,query);
//	}
	public ResponseEntity<List<WholeQueues>> listWholeQueues(@RequestBody ListWholeQueuesPojo listWholeQueuesPojo) {
		List<WholeQueues> wholeQueues = wholeQueuesService.selectList(listWholeQueuesPojo.getOrganizationId(),listWholeQueuesPojo.getPageNo(),listWholeQueuesPojo.getPageSize(),listWholeQueuesPojo.getQuery());
	
			ResponseEntity<List<WholeQueues>> entity=new ResponseEntity<>();
			
			entity.setData(wholeQueues);
			
			return entity;
	}

}